//Queue1.h
/********************************************************************************
*																				*
*	Author:			Jared Szechy												*
*	Assignment:		Assignment 6												*
*	Class:			CPS-151														*
*	Instructor:		V. Starkley													*
*	Due Date:		October 13													*
*																				*
*	This file defines the queue class.											*
*																				*
********************************************************************************/

#include "max_items.h"

template<class ItemType>
class QueType
{
public: 
    QueType();
    //creates empty queue of size MAX_ITEMS

    QueType(int max);
    //creates empty queue of size max

	QueType(const QueType& source);
	//copy constructor

    ~QueType();
    //Class destructor.

	QueType operator = (const QueType& source);
	//overloaded assignment operator

    void MakeEmpty();
	//pre:  none
    //post: Queue is empty.

    bool IsEmpty() const;
    //pre:  none
	//post: returns true if queue is empty; false if not

    bool IsFull() const;
	//pre:  none
    //post: returns true if queue is full; false if not

    bool Enqueue(ItemType newItem);
    //pre:  none
    //post: returns false if qeuue is full
	//		 if queue is not full, newItem is added at rear of queue
	//		 and function returns true

    bool Dequeue(ItemType& item);
    //pre:  none
	//post: returns false if queue is empty
	//      if queue is not empty, firstItem is removed from queue,
	//		item is a copy of firstItem and function returns true


private:
    int front;
    int rear;
    ItemType* items;
    int maxQue;
};

#include "queue1.cpp"